Repository navigation
Conversation
dougqh
force-pushed
the
dougqh/kafka-value-views
branch
from
November 21, 2026 15:03
dc3fa0c to
ff9248d
Compare
dougqh
force-pushed
the
dougqh/datadog-id-views
branch
from
November 21, 2026 15:11
60b0a1f to
34e9eee
Compare
dougqh
force-pushed
the
dougqh/kafka-value-views
branch
from
November 21, 2026 15:11
ff9248d to
c93abef
Compare
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
dougqh
force-pushed
the
dougqh/datadog-id-views
branch
from
November 21, 2026 19:14
34e9eee to
06bd242
Compare
dougqh
force-pushed
the
dougqh/kafka-value-views
branch
from
November 21, 2026 19:15
c93abef to
08e45a4
Compare
The byte counterpart of SubSequence: a view of a range of an array whose bytes are all ASCII, without copying or decoding them, so a value that arrived as bytes can be parsed in place. ofAscii returns null if a byte isn't ASCII, and the caller decodes as before. @NoEscape, like SubSequence: a view of a fetched record's bytes shares the whole fetch buffer, so a value that must be kept is copied with toString(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the visitor takes transient views (the composite propagator's cache does) and values are plain UTF-8, the Kafka 3.8 adapter hands a fetched header's parse-only value (the Datadog trace id, parent id and sampling priority) as an AsciiSequence over its bytes instead of decoding it, so the Datadog extractor parses it in place. Non-ASCII values, direct buffers, Base64 mode and other visitors take the String path as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/kafka-value-views
branch
from
November 21, 2026 19:39
08e45a4 to
cf19f37
Compare
dougqh
force-pushed
the
dougqh/datadog-id-views
branch
from
November 21, 2026 19:39
06bd242 to
11bb1c7
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
The Kafka 3.8+ consumer's extraction hands the Datadog trace id, parent id and sampling priority headers' values as views of the record's bytes (
AsciiSequence, #13617) instead of decoding them intoStrings, so the Datadog extractor parses them in place (#13619). Extracted contexts are unchanged.Stacked on #13619. Part 5 of the value-views series (#13616, #13617, #13618, #13619). Includes #13617's commit (
Add AsciiSequence), cherry-picked because #13617 is based on master; it drops out on rebase once #13617 lands.Additional Notes
TransientValueConsumer(the composite propagator's cache does), the adapter isn't in Base64 mode, the header has the agent's accessor (Read fetched Kafka headers without copying them first #13600), itsHeaderSchemaconstant is parse-only, and the value bytes are ASCII and in a heap buffer (or an array Kafka already copied). Otherwise it decodes as before.CarrierKeys.header(key), an identity check, since a matched fetched key is the declared name itself.RecordHeaderAccessTest): parse-only values arrive asAsciiSequences and others asStrings, including a header type other than Kafka's; values Kafka already copied are viewed too; non-ASCII and missing values aren't viewed; Base64 mode and visitors that don't take views getStrings. The module's tests pass (40, and 87 forked).KafkaFetchedHeadersBenchmark,fetchedAccessor): the whole series (Let carriers hand parse-only header values as transient views #13618–this PR) against Dispatch extraction on header constants instead of comparing names #13613: −104 B per record atappHeaders=0(3084 → 2980, −3.4%) and −105 B atappHeaders=3; time within the error bars. A multi-fork A/B is pending.An earlier version of the series added allocation: every interpreter in the compound extraction copied each view, and the cache kept views in a second array. Both are fixed (Parse Datadog ids and sampling priority from transient views #13619, Let carriers hand parse-only header values as transient views #13618).
🤖 Generated with Claude Code